/* 
 * File:   Boss.h
 * Author: paula
 *
 * Created on 29 de noviembre de 2014, 16:26
 */

#ifndef BOSS_H
#define	BOSS_H

#include <string>
#include <iostream>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include "../Define/DefaultValues.h"
#include "../Define/Structs.h"
#include "../Controller/SBSLog.h"
#include "ClientSocket.h"
#include "SBSImage.h"
#include "Dot.h"
#include "Drawable.h"

class Boss : public Drawable {
public:
    Boss();
    Boss(int x, int y, SDL_Renderer** gRenderer);
    Boss(const Boss & orig);
    virtual ~Boss();

    void wait();

    void actualizePosition(float posX, float PosY);
    void actualizeState(int state);
    int getState();
private:
    SBSImage* boss0;
    SBSImage* boss1;
    SBSImage* boss2;
    SBSImage* boss3;
    SBSImage* boss4;

    SBSImage* imageToDraw;

    string path;
    int state;
    SDL_Renderer* gRenderer;
    Dot *dot;
    struct ObjectInit data;

    bool directionRight;
    bool jumping, attacked, attacking, fallingDown, walking, waiting;
    int counterAttacked;

    int getCharacterId();
    struct ObjectInit getData();
    float getPosX();
    float getPosY();
    void updateData(struct ObjectInit data);
    void actualize();
    void draw();
    void changeImage(SBSImage* image);

    void setWaiting();
    void setJumping();
    void setAttacking();
    void setAttacked();
    void setFalling();

    void keepAttacking();
    void keepAttacked();
    void keepJumping();
    void keepFallingDown();

    void loadMedia();
    void freeMedia();
};

#endif	/* BOSS_H */

